This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Custom RPC implementation for node.
#3109
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
If you rebase the test should pass... Denis fixed this in the gitlab.yml file. |
|
mark! |
gavofyork
approved these changes
Aug 8, 2019
Member
|
one file left. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2263 #3033
Closes #1096
This PR introduces a way to customize and extend existing set of core RPCs with some additional methods that might be more runtime-specific.
It relies on not-yet-merged paritytech/jsonrpc#447 feature in JSON-RPC repo.
Extension is done inside
ServiceFactory, and this breaks backward compatibility, since now you need to at least define an empty extension:type RpcExtensions = () {}As an example of custom RPC in
nodeI've implementedaccount_nextNoncethat takes into account nonces of transactions in the pending transaction pool (#2263).Since current state nonce is only stored in the
systemmodule, I've added a custom RuntimeApi to expose that to rust code (#1096).Additionality, the PR introduces
node-testingcrate that contains atest-clientrunning on top ofnode-runtime.Submitting as draft, as we still need to wait for new release of
jsonrpc.